from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.structure.graph import Graph


def establish_connection(connection_string, traversal_source="g"):
    g = (
        Graph()
        .traversal()
        .withRemote(DriverRemoteConnection(connection_string, traversal_source))
    )

    return g
